package org.sockettest.client;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class Main {
    public static void main(String[] args) throws IOException, InterruptedException {
        Socket socket = new Socket("127.0.0.1", 11212);
        System.out.println("连接成功");
        Thread rt = new Thread(new ReaderThread(socket));
        Thread st = new Thread(new SenderThread(socket));
        rt.start();
        st.start();
        st.join();
    }
}
